package com.example.common.exception;

// 自定义全局异常类
public class CustomException extends RuntimeException {
    // HTTP异常代码
    private final int code;
    
    /**
     * 错误类构造函数
     * @param code    HTTP异常代码
     * @param message 异常信息
     */
    public CustomException(int code, String message) {
        super(message);
        this.code = code;
    }
    
    public int getCode() {
        return code;
    }
}
